﻿using System.Web.Script.Serialization;

namespace SharePoint.Sunbox.Sandbox.Core
{
    internal static class Helpers
    {
        public static string SerializeObject(object obj)
        {
            var s = new JavaScriptSerializer();

            return s.Serialize(obj);
        }

        public static T DeserializeObject<T>(string json)
        {
            var s = new JavaScriptSerializer();
            return s.Deserialize<T>(json);
        }
    }
}